<!DOCTYPE html>
<html>
<head>
	<title>函数的参数</title>
</head>
<body>
<script type="text/javascript">
	
	// 简单类型做函数参数
	function fn(a, b) {
		a = 12;
		b = 13;
		console.log(a)		// 12
		console.log(b)		// 13
	}
	var a = 1;
	var b = 2;
	fn(a, b);
	console.log(a)		// 1
	console.log(b)		// 2


	// 复杂类型做函数的参数
	function peo(man) {
		man.name = 123;
		console.log(man)	// 123
	}
	var man = {name: 'cuihao'};
	peo(man);
	console.log(man);		// 123

</script>
</body>
</html>